package com.ccys.cms.service.consultation.impl;

import com.ccys.cms.service.consultation.BookingConsultNoteService;
import com.ccys.common.vo.ResponseResult;
import com.ccys.db.entity.TblBookingConsultNote;
import com.ccys.db.mapper.TblBookingConsultNoteMapper;
import com.ccys.db.page.PageDto;
import com.ccys.db.rely.service.impl.BaseServiceImpl;
import com.ccys.db.vo.consultation.BookingConsultNoteVo;
import com.ccys.db.vo.consultation.ConsultationBasicsDetailVo;
import com.github.pagehelper.PageInfo;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;

@Service
public class BookingConsultNoteServiceImpl extends BaseServiceImpl<TblBookingConsultNote> implements BookingConsultNoteService {

    @Resource
    private TblBookingConsultNoteMapper mapper;

    @Override
    public ResponseResult getPage(String bookingId) {
        PageDto.startPage();
        List<BookingConsultNoteVo> list = mapper.getList(bookingId);
        PageInfo<BookingConsultNoteVo> info = new PageInfo<>(list);
        return ResponseResult.success(info);
    }

    @Override
    public ConsultationBasicsDetailVo getBasicsInfo(String bookingId) {

        return mapper.getBasicsInfo(bookingId);
    }
}
